from django.db import models

# Create your models here.

class AuthorModels(models.Model):
    name=models.CharField(max_length=20)
    gender=models.CharField(max_length=2)


class BookModels(models.Model):
    name=models.CharField(max_length=20)
    price=models.DecimalField(max_digits=5,decimal_places=2)
    counts=models.IntegerField()
    author=models.ForeignKey(AuthorModels,models.CASCADE)






